package cn.iocoder.yudao.module.wms.controller.admin.person.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO;
import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.VO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 业务员档案 Response VO")
@Data
@ExcelIgnoreUnannotated
public class PersonRespVO implements VO {

    @Schema(description = "业务员id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31939")
    private Long id;

    @Schema(description = "部门id", example = "18239")
    @Trans(type = TransType.SIMPLE, target = DeptDO.class, fields = "name", ref = "deptName")
    private Long deptId;

    @Schema(description = "部门", example = "18239")
    @ExcelProperty("部门")
    private String deptName;

    @Schema(description = "业务员编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("业务员编码")
    private String code;

    @Schema(description = "业务员名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @ExcelProperty("业务员名称")
    private String name;

    @Schema(description = "性别")
    @ExcelProperty(value = "性别", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.USER_SEX)
    private Integer sex;

    @Schema(description = "出生日期")
    @ExcelProperty("出生日期")
    private LocalDateTime birthday;

    @Schema(description = "创建时间")
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}